<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~ Copyright (c) 2021-2022 Contributors to the Eclipse Foundation
  ~
  ~ See the NOTICE file(s) distributed with this work for additional
  ~ information regarding copyright ownership.
  ~
  ~ This program and the accompanying materials are made available under the
  ~ terms of the Eclipse Public License 2.0 which is available at
  ~ http://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0
  ~ which is available at https://www.apache.org/licenses/LICENSE-2.0.
  ~
  ~ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<div class="localLoader" [class.hidden]="!loading">
    <winery-loader></winery-loader>
</div>

<div *ngIf="!loading">
    <br>
    <label class="control-label" for="metaTitle">Title <span style="color: darkred">*</span></label>
    <input class="form-control" id="metaTitle" name="title" [(ngModel)]="data.title">
    <br>
    <label class="control-label" for="metaAuthor">Author <span style="color: darkred">*</span></label>
    <input class="form-control" id="metaAuthor" name="author" [(ngModel)]="data.author">
    <br>
    <label class="control-label" for="metaContact">E-Mail <span style="color: darkred">*</span></label>
    <input class="form-control" id="metaContact" name="contact" [(ngModel)]="data.contact">
    <br>
    <div class="form-group">
        <label class="label-form">Description <span style="color: darkred">*</span></label>
        <textarea class="form-control" id="researchObjectDescriptionDiv" name="description"
                  [(ngModel)]="data.description"></textarea>
    </div>

    <div class="control-group">
        <label class="control-label">Subject <span style="color: darkred">*</span></label>
        <div>
            <ng-select [multiple]="true"
                       [(ngModel)]="selection"
                       [items]="subjects"
                       placeholder="Select Subjects">
            </ng-select>
        </div>
    </div>
    <br>
    <span style="color: darkred; float: right">* Required fields for publishing a ROAR.</span>
    <br>
    <div>
        <button class="btn btn-primary" (click)="saveResearchObjectMetadata()" name="save">
            Save
        </button>
    </div>
</div>
